/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: May 30, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.hce.clustering.hierarchical;

import edu.psu.geovista.app.hce.clustering.model.BCluster;

public class NumberClusterArranger implements BinaryClusterArranger {
    public BCluster[] arrange(BCluster cls1, BCluster cls2 ){
        int num1 = cls1.getNumOfleaf();
        int num2 = cls2.getNumOfleaf();
        if(num1>=num2){ //cluster 1 has more leaf than cluster 2
            return new BCluster[]{cls1,cls2};
        }
        else{
            return new BCluster[]{cls2,cls1};
        }
    }
}
